﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Dialog.Master" AutoEventWireup="true"
    CodeBehind="TemplateDetailsEdit.aspx.cs" Inherits="NetDon.eBoss.Portal.HtmlTool.TemplateDetailsEdit" %>

<%@ Import Namespace="NetDon.eBoss.Data.EntityClasses" %>
<%@ Register Src="../Controls/RequiredMark.ascx" TagName="RequiredMark" TagPrefix="uc1" %>
<%@ Register TagPrefix="ajaxToolkit" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit, Version=3.0.30930.28736, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
        <tr>
            <td valign="top" style="width: 100px; background-color: #EEEEEE">
                <div style="padding: 5px 10px">
                    <span style="font-color: #3D3D3D; font-size: 9pt; font-weight: bold">帐号列表：</span>
                    <asp:Repeater runat="server" ID="rptAccount">
                        <ItemTemplate>
                            <asp:HyperLink runat="server" ID="lblName" Text='<%# Server.HtmlEncode(Convert.ToString(Eval("Accountname")))%>'
                                NavigateUrl='<%# string.Format("~/HtmlTool/TemplateDetailsEdit.aspx?AccountId={0}&Id={1}",Eval("Id"),Id) %>'
                                Font-Bold="true" Height="22px" Style="line-height: 22px;"></asp:HyperLink>
                        </ItemTemplate>
                        <SeparatorTemplate>
                            <br />
                        </SeparatorTemplate>
                    </asp:Repeater>
                </div>
            </td>
            <td>
                <NetDon:FormPanel ID="panelCustomInfo" runat="server" CaptionAlign="NotSet" RepeatColumns="2">
                    <Items>
                        <NetDon:FormItem HeaderVisible="False" ColumnSpan="2">
                            <ContentTemplate>
                                <div style="padding-top: 10px">
                                    <center>
                                        <asp:Button ID="Button1" runat="server" SkinID="Button120" Text="保存本账号" OnClick="btnSave_Click">
                                        </asp:Button>
                                        <asp:Button ID="Button2" runat="server" SkinID="Button120" Text="保存所有账号" OnClick="btnSaveAll_Click">
                                        </asp:Button>
                                        <asp:Button ID="Button3" runat="server" Text="退出" CausesValidation="false" OnClick="btnClose_Click">
                                        </asp:Button>
                                    </center>
                                </div>
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="当前账号：" FullRow="True">
                            <ContentTemplate>
                                <%# new HtmltoolaccountEntity(AccountId).Accountname %>
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="HtmlTool分类" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:DropDownList ID="ddlHtmlToolCategory" DataSourceID="ObjectDataSourceCategory"
                                    AppendDataBoundItems="True" runat="server" DataTextField="Category" DataValueField="Id"
                                    AutoPostBack="True" OnSelectedIndexChanged="ddlHtmlToolCategory_SelectedIndexChanged">
                                </asp:DropDownList>
                                <asp:ObjectDataSource ID="ObjectDataSourceCategory" runat="server" OldValuesParameterFormatString="original_{0}"
                                    SelectMethod="RetrieveHtmlToolEbayCategory" TypeName="NetDon.eBoss.Portal.HtmlTool.HtmlToolDataSource">
                                </asp:ObjectDataSource>
                                <uc1:RequiredMark ID="RequiredMark3" runat="server" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="ddlHtmlToolCategory"
                                    Display="None" ErrorMessage="请选择HtmlTool分类" SetFocusOnError="True"></asp:RequiredFieldValidator>
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="英文标题" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtEnglishtitle" runat="server" Text='<%#Bind("Englishtitle") %>'
                                    Width="400px"></asp:TextBox>
                                <uc1:RequiredMark ID="RequiredMark7" runat="server" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtEnglishtitle"
                                    Display="None" ErrorMessage="请输入英文标题" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                <ajaxToolkit:CollapsiblePanelExtender ID="cpe" runat="Server" TargetControlID="pnlTitleVocabulary"
                                    CollapsedSize="0" ExpandedSize="300" Collapsed="True" ExpandControlID="LinkButton1"
                                    CollapseControlID="LinkButton1" AutoCollapse="False" AutoExpand="False" ScrollContents="True"
                                    TextLabelID="Label1" CollapsedText="Show Details..." ExpandedText="Hide Details"
                                    ImageControlID="ImageTitle" ExpandedImage="~/images/Button/collapse.jpg" CollapsedImage="~/images/Button/expand.jpg"
                                    ExpandDirection="Vertical" />
                                <asp:LinkButton runat="server" ID="LinkButton1">
                                    <asp:Image runat="server" ID="ImageTitle"></asp:Image>
                                    <asp:Label runat="server" ID="Label1"></asp:Label></asp:LinkButton>
                                <asp:Panel runat="server" ID="pnlTitleVocabulary" class="collapsePanelHeader" Style="height: 30px;
                                    width: 460px">
                                    <p style="font-size: 15px">
                                        <asp:Label runat="server" ID="lblTitleVocabulary"></asp:Label>
                                 
                                    </p>
                                </asp:Panel>
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="品牌">
                            <ContentTemplate>
                                <asp:DropDownList ID="ddlHtmlToolTrademark" DataSourceID="ObjectDataSourceHtmlToolTrademark"
                                    AppendDataBoundItems="True" runat="server" DataTextField="Name" DataValueField="Id"
                                    AutoPostBack="True" OnSelectedIndexChanged="ddlHtmlToolTrademark_SelectedIndexChanged">
                                </asp:DropDownList>
                                <asp:ObjectDataSource ID="ObjectDataSourceHtmlToolTrademark" runat="server" OldValuesParameterFormatString="original_{0}"
                                    SelectMethod="RetrieveHtmlToolTrademark" TypeName="NetDon.eBoss.Portal.HtmlTool.HtmlToolDataSource">
                                </asp:ObjectDataSource>
                                <uc1:RequiredMark ID="RequiredMark5" runat="server" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="ddlHtmlToolTrademark"
                                    Display="None" ErrorMessage="请选择品牌" SetFocusOnError="True"></asp:RequiredFieldValidator>
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="市场">
                            <ContentTemplate>
                                <asp:TextBox ID="txtMarket" runat="server" Text='<%#Bind("Market") %>' Enabled="False">
                                </asp:TextBox>
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="ebay款式">
                            <ContentTemplate>
                                <asp:DropDownList ID="ddlHtmlToolStyle" AppendDataBoundItems="True" runat="server"
                                    DataTextField="Style" DataValueField="Id">
                                </asp:DropDownList>
                                <uc1:RequiredMark ID="RequiredMark1" runat="server" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlHtmlToolStyle"
                                    Display="None" ErrorMessage="请选择ebay款式" SetFocusOnError="True"></asp:RequiredFieldValidator>
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="ebay颜色">
                            <ContentTemplate>
                                <asp:Label ID="txteBayColor" runat="server"></asp:Label>
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="货号">
                            <ContentTemplate>
                                <asp:Label ID="txtItemNo" runat="server" Text='<%#Bind("ItemNo") %>'>
                                </asp:Label>
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="零售价" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtRetailPrice" Text='<%#Eval("RetailPrice")%>' runat="server" MaxLength="9"
                                    Width="60px" Style="text-align: right"></asp:TextBox>
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="特征" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtSpecifics" runat="server" Text='<%#Bind("Specifics") %>' Width="400px"></asp:TextBox>
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="尺码表" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtSizetable" runat="server" Text='<%#Bind("Sizetable") %>' Width="400px">       </asp:TextBox>
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="材料" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtMaterial" runat="server" Text='<%#Bind("Material") %>' Width="400px">
                                </asp:TextBox><uc1:RequiredMark ID="RequiredMark6" runat="server" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtMaterial"
                                    Display="None" ErrorMessage="请输入材料" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                <ajaxToolkit:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="Server"
                                    TargetControlID="pnlMaterialVocabulary" CollapsedSize="0" ExpandedSize="300"
                                    Collapsed="True" ExpandControlID="LinkButton2" CollapseControlID="LinkButton2"
                                    AutoCollapse="False" AutoExpand="False" ScrollContents="True" TextLabelID="Label2"
                                    CollapsedText="Show Details..." ExpandedText="Hide Details" ImageControlID="ImageMaterial"
                                    ExpandedImage="~/images/Button/collapse.jpg" CollapsedImage="~/images/Button/expand.jpg"
                                    ExpandDirection="Vertical" />
                                <asp:LinkButton runat="server" ID="LinkButton2">
                                    <asp:Image runat="server" ID="ImageMaterial"></asp:Image>
                                    <asp:Label runat="server" ID="Label2"></asp:Label></asp:LinkButton>
                                <asp:Panel runat="server" ID="pnlMaterialVocabulary" class="collapsePanelHeader"
                                    Style="height: 30px; width: 460px">
                                    <p style="font-size: 15px">
                                        <asp:Label runat="server" ID="labelVocabularyMaterial"></asp:Label>
                                    </p>
                                </asp:Panel>
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="注意" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtComment" runat="server" Text='<%#Bind("Comment") %>' TextMode="MultiLine"
                                    Width="400px" Height="90px">
                                </asp:TextBox>
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="描述" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtDescription" runat="server" Text='<%#Bind("Description") %>'
                                    TextMode="MultiLine" Width="400px" Height="70px">
                                </asp:TextBox>
                                <uc1:RequiredMark ID="RequiredMark2" runat="server" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtDescription"
                                    Display="None" ErrorMessage="请输入描述" SetFocusOnError="True"></asp:RequiredFieldValidator>
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="图片1" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtPicUrl1" runat="server" Text='<%#Bind("PicUrl1") %>' Width="200px">
                                </asp:TextBox>
                                <asp:Image runat="server" ID="imge1" ImageUrl='<%#GetImageUrl(Eval("Picurl1"))%>' />
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="图片2" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtPicUrl2" runat="server" Text='<%#Bind("PicUrl2") %>' Width="200px">
                                </asp:TextBox>
                                <asp:Image runat="server" ID="Image1" ImageUrl='<%#GetImageUrl(Eval("Picurl2"))%>' />
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="图片3" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtPicUrl3" runat="server" Text='<%#Bind("PicUrl3") %>' Width="200px">
                                </asp:TextBox>
                                <asp:Image runat="server" ID="Image2" ImageUrl='<%#GetImageUrl(Eval("Picurl3"))%>' />
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="图片4" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtPicUrl4" runat="server" Text='<%#Bind("PicUrl4") %>' Width="200px">
                                </asp:TextBox>
                                <asp:Image runat="server" ID="Image3" ImageUrl='<%#GetImageUrl(Eval("Picurl4"))%>' />
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="图片5" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtPicUrl5" runat="server" Text='<%#Bind("PicUrl5") %>' Width="200px">
                                </asp:TextBox>
                                <asp:Image runat="server" ID="Image4" ImageUrl='<%#GetImageUrl(Eval("Picurl5"))%>' />
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="图片6" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtPicUrl6" runat="server" Text='<%#Bind("PicUrl6") %>' Width="200px">
                                </asp:TextBox>
                                <asp:Image runat="server" ID="Image5" ImageUrl='<%#GetImageUrl(Eval("Picurl6"))%>' />
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="图片7" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtPicUrl7" runat="server" Text='<%#Bind("PicUrl7") %>' Width="200px">
                                </asp:TextBox>
                                <asp:Image runat="server" ID="Image6" ImageUrl='<%#GetImageUrl(Eval("Picurl7"))%>' />
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="图片8" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtPicUrl8" runat="server" Text='<%#Bind("PicUrl8") %>' Width="200px">
                                </asp:TextBox>
                                <asp:Image runat="server" ID="Image7" ImageUrl='<%#GetImageUrl(Eval("Picurl8"))%>' />
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="图片9" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtPicUrl9" runat="server" Text='<%#Bind("PicUrl9") %>' Width="200px">
                                </asp:TextBox>
                                <asp:Image runat="server" ID="Image8" ImageUrl='<%#GetImageUrl(Eval("Picurl9"))%>' />
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="图片10" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtPicUrl10" runat="server" Text='<%#Bind("PicUrl10") %>' Width="200px">
                                </asp:TextBox>
                                <asp:Image runat="server" ID="Image9" ImageUrl='<%#GetImageUrl(Eval("Picurl10"))%>' />
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="图片11" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtPicUrl11" runat="server" Text='<%#Bind("PicUrl11") %>' Width="200px">
                                </asp:TextBox>
                                <asp:Image runat="server" ID="Image10" ImageUrl='<%#GetImageUrl(Eval("Picurl11"))%>' />
                            </ContentTemplate>
                        </NetDon:FormItem>
                        <NetDon:FormItem HeaderText="图片12" ColumnSpan="2">
                            <ContentTemplate>
                                <asp:TextBox ID="txtPicUrl12" runat="server" Text='<%#Bind("PicUrl12") %>' Width="200px">
                                </asp:TextBox>
                                <asp:Image runat="server" ID="Image11" ImageUrl='<%#GetImageUrl(Eval("Picurl12"))%>' />
                            </ContentTemplate>
                        </NetDon:FormItem>
                    </Items>
                </NetDon:FormPanel>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <div style="padding-top: 10px">
                    <center>
                        <asp:Button ID="btnSave" runat="server" SkinID="Button120" Text="保存本账号" OnClick="btnSave_Click">
                        </asp:Button>
                        <asp:Button ID="btnSaveAll" runat="server" SkinID="Button120" Text="保存所有账号" OnClick="btnSaveAll_Click">
                        </asp:Button>
                        <asp:Button ID="btnReturn" runat="server" Text="退出" CausesValidation="false"></asp:Button>
                        <NetDon:ValidationSummary ID="ValidationSummary2" runat="server" ShowMessageBox="true"
                            ShowSummary="false" />
                        <br />
                        <br />
                        <br />
                    </center>
                </div>
            </td>
        </tr>
    </table>
</asp:Content>
